home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7413 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: astfgl.idb.hist.no!anneu
  2. From: anneu@colargol.idb.hist.no (Anne Kristine Ugedal)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: C++ Classes
  5. Date: 16 Apr 1996 09:02:36 GMT
  6. Organization: Sor-Trondelag College, Norway
  7. Distribution: world
  8. Message-ID: <4kvnnc$rhe@astfgl.idb.hist.no>
  9. References: <Stewart_Menday.3jrp@kumear.DIALix.oz.au>
  10. NNTP-Posting-Host: colargol.idb.hist.no
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Stewart Menday (Stewart_Menday@kumear.DIALix.oz.au) wrote:
  14. : Hi ALL
  15. :      I have a question about C++ and calling functions which have been
  16. : overriden.
  17.  
  18. : If I have a class x say and it is derived from class y say and they both a
  19. : method print() say.  How do I call class y print from within class x?
  20.  
  21. [snip]
  22.  
  23. : void x::print();
  24. : {
  25. :      //some stuff for x
  26.  
  27. :      //I wish to call y.print
  28. : }
  29.  
  30. : Any help would be great.
  31.  
  32. You are almost there, try y::print()
  33.  
  34. Good luck!
  35.  
  36. Anne
  37.  
  38. --
  39. * Anne Kristine Ugedal               *** Win.HLP AS, Norway - my employer *
  40. ** Spare time Amiga developer         *** Office time Windows developer. **
  41. *** anneu@colargol.idb.hist.no         *** anne@winhlp.no               ***
  42. **** http://colargol.idb.hist.no/~anneu *** http://www.winhlp.no       ****
  43.